/*
 * Copyright (C) 2017 Pingan, Inc. All Rights Reserved.
 */

package com.pingan.haofang.searchcloud.indexdatasource.dto;

import com.pingan.haofang.searchcloud.index.constants.IndexDataSourceType;
import com.pingan.haofang.searchcloud.index.constants.IndexDatasourceStatus;
import io.swagger.annotations.ApiModelProperty;

/**
 * 索引构建DTO
 *
 * @author zhangbi617
 * @date 08/05/2017
 */
public class IndexDatasourceDTO {

    /**
     * ID
     */
    private Long id;

    /**
     * 数据源名称
     */
    private String name;

    /**
     * 索引ID
     */
    private Long indexId;

    /**
     * 状态
     *
     * @see IndexDatasourceStatus
     */
    private Integer status;

    /**
     * 全量导入方式
     *
     * @see IndexDataSourceType
     */
    private Integer fullDatasourceType;

    /**
     * 增量导入方式
     *
     * @see IndexDataSourceType
     */
    private Integer incDatasourceType;

    /**
     * 全量导入设置,当fullImportType取值为0时需要传该字段
     */
    private RpcIndexDataSourceDTO fullDatasourceRpc;

    /**
     * 增量导入设置,当incImportType取值为0时需要传该字段
     */
    private RpcIndexDataSourceDTO incDatasourceRpc;

    @ApiModelProperty(value = "创建人")
    private String createByName;

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the indexId
     */
    public Long getIndexId() {
        return indexId;
    }

    /**
     * @param indexId the indexId to set
     */
    public void setIndexId(Long indexId) {
        this.indexId = indexId;
    }

    /**
     * @return the status
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * @param status the status to set
     */
    public void setStatus(Integer status) {
        this.status = status;
    }


    /**
     * @return the fullDatasourceType
     */
    public Integer getFullDatasourceType() {
        return fullDatasourceType;
    }

    /**
     * @param fullDatasourceType the fullDatasourceType to set
     */
    public void setFullDatasourceType(Integer fullDatasourceType) {
        this.fullDatasourceType = fullDatasourceType;
    }

    /**
     * @return the incDatasourceType
     */
    public Integer getIncDatasourceType() {
        return incDatasourceType;
    }

    /**
     * @param incDatasourceType the incDatasourceType to set
     */
    public void setIncDatasourceType(Integer incDatasourceType) {
        this.incDatasourceType = incDatasourceType;
    }

    /**
     * @return the fullDatasourceRpc
     */
    public RpcIndexDataSourceDTO getFullDatasourceRpc() {
        return fullDatasourceRpc;
    }

    /**
     * @param fullDatasourceRpc the fullDatasourceRpc to set
     */
    public void setFullDatasourceRpc(RpcIndexDataSourceDTO fullDatasourceRpc) {
        this.fullDatasourceRpc = fullDatasourceRpc;
    }

    /**
     * @return the incDatasourceRpc
     */
    public RpcIndexDataSourceDTO getIncDatasourceRpc() {
        return incDatasourceRpc;
    }

    /**
     * @param incDatasourceRpc the incDatasourceRpc to set
     */
    public void setIncDatasourceRpc(RpcIndexDataSourceDTO incDatasourceRpc) {
        this.incDatasourceRpc = incDatasourceRpc;
    }

    public String getCreateByName() {
        return createByName;
    }

    public void setCreateByName(String createByName) {
        this.createByName = createByName;
    }

    @Override
    public String toString() {
        return "IndexDatasourceDTO{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", indexId=" + indexId +
                ", status=" + status +
                ", fullDatasourceType=" + fullDatasourceType +
                ", incDatasourceType=" + incDatasourceType +
                ", fullDatasourceRpc=" + fullDatasourceRpc +
                ", incDatasourceRpc=" + incDatasourceRpc +
                ", createByName='" + createByName + '\'' +
                '}';
    }
}
